home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / Includes_and_Autodocs_3.5 / include / clib / graphics_protos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-28  |  12.6 KB  |  237 lines

  1. #ifndef  CLIB_GRAPHICS_PROTOS_H
  2. #define  CLIB_GRAPHICS_PROTOS_H
  3.  
  4. /*
  5. **    $VER: graphics_protos.h 40.2 (6.6.1998)
  6. **
  7. **    C prototypes. For use with 32 bit integers only.
  8. **
  9. **    Copyright © 1999 Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif /* __cplusplus */
  16.  
  17. #ifndef  GRAPHICS_GFX_H
  18. #include <graphics/gfx.h>
  19. #endif
  20. #ifndef  GRAPHICS_DISPLAYINFO_H
  21. #include <graphics/displayinfo.h>
  22. #endif
  23. #ifndef  GRAPHICS_GELS_H
  24. #include <graphics/gels.h>
  25. #endif
  26. #ifndef  GRAPHICS_RASTPORT_H
  27. #include <graphics/rastport.h>
  28. #endif
  29. #ifndef  GRAPHICS_VIEW_H
  30. #include <graphics/view.h>
  31. #endif
  32. #ifndef  GRAPHICS_COPPER_H
  33. #include <graphics/copper.h>
  34. #endif
  35. #ifndef  GRAPHICS_CLIP_H
  36. #include <graphics/clip.h>
  37. #endif
  38. #ifndef  GRAPHICS_REGIONS_H
  39. #include <graphics/regions.h>
  40. #endif
  41. #ifndef  GRAPHICS_SPRITE_H
  42. #include <graphics/sprite.h>
  43. #endif
  44. #ifndef  GRAPHICS_TEXT_H
  45. #include <graphics/text.h>
  46. #endif
  47. #ifndef  GRAPHICS_SCALE_H
  48. #include <graphics/scale.h>
  49. #endif
  50. #ifndef  HARDWARE_BLIT_H
  51. #include <hardware/blit.h>
  52. #endif
  53. /*------ BitMap primitives ------*/
  54. LONG BltBitMap( CONST struct BitMap *srcBitMap, LONG xSrc, LONG ySrc, struct BitMap *destBitMap, LONG xDest, LONG yDest, LONG xSize, LONG ySize, ULONG minterm, ULONG mask, PLANEPTR tempA );
  55. VOID BltTemplate( CONST PLANEPTR source, LONG xSrc, LONG srcMod, struct RastPort *destRP, LONG xDest, LONG yDest, LONG xSize, LONG ySize );
  56. /*------ Text routines ------*/
  57. VOID ClearEOL( struct RastPort *rp );
  58. VOID ClearScreen( struct RastPort *rp );
  59. WORD TextLength( struct RastPort *rp, CONST_STRPTR string, ULONG count );
  60. LONG Text( struct RastPort *rp, CONST_STRPTR string, ULONG count );
  61. LONG SetFont( struct RastPort *rp, CONST struct TextFont *textFont );
  62. struct TextFont *OpenFont( struct TextAttr *textAttr );
  63. VOID CloseFont( struct TextFont *textFont );
  64. ULONG AskSoftStyle( struct RastPort *rp );
  65. ULONG SetSoftStyle( struct RastPort *rp, ULONG style, ULONG enable );
  66. /*------    Gels routines ------*/
  67. VOID AddBob( struct Bob *bob, struct RastPort *rp );
  68. VOID AddVSprite( struct VSprite *vSprite, struct RastPort *rp );
  69. VOID DoCollision( struct RastPort *rp );
  70. VOID DrawGList( struct RastPort *rp, struct ViewPort *vp );
  71. VOID InitGels( struct VSprite *head, struct VSprite *tail, struct GelsInfo *gelsInfo );
  72. VOID InitMasks( struct VSprite *vSprite );
  73. VOID RemIBob( struct Bob *bob, struct RastPort *rp, struct ViewPort *vp );
  74. VOID RemVSprite( struct VSprite *vSprite );
  75. VOID SetCollision( ULONG num, VOID (*routine)(struct VSprite *gelA, struct VSprite *gelB), struct GelsInfo *gelsInfo );
  76. VOID SortGList( struct RastPort *rp );
  77. VOID AddAnimOb( struct AnimOb *anOb, struct AnimOb **anKey, struct RastPort *rp );
  78. VOID Animate( struct AnimOb **anKey, struct RastPort *rp );
  79. BOOL GetGBuffers( struct AnimOb *anOb, struct RastPort *rp, LONG flag );
  80. VOID InitGMasks( struct AnimOb *anOb );
  81. /*------    General graphics routines ------*/
  82. VOID DrawEllipse( struct RastPort *rp, LONG xCenter, LONG yCenter, LONG a, LONG b );
  83. LONG AreaEllipse( struct RastPort *rp, LONG xCenter, LONG yCenter, LONG a, LONG b );
  84. VOID LoadRGB4( struct ViewPort *vp, CONST UWORD *colors, LONG count );
  85. VOID InitRastPort( struct RastPort *rp );
  86. VOID InitVPort( struct ViewPort *vp );
  87. ULONG MrgCop( struct View *view );
  88. ULONG MakeVPort( struct View *view, struct ViewPort *vp );
  89. VOID LoadView( struct View *view );
  90. VOID WaitBlit( VOID );
  91. VOID SetRast( struct RastPort *rp, ULONG pen );
  92. VOID Move( struct RastPort *rp, LONG x, LONG y );
  93. VOID Draw( struct RastPort *rp, LONG x, LONG y );
  94. LONG AreaMove( struct RastPort *rp, LONG x, LONG y );
  95. LONG AreaDraw( struct RastPort *rp, LONG x, LONG y );
  96. LONG AreaEnd( struct RastPort *rp );
  97. VOID WaitTOF( VOID );
  98. VOID QBlit( struct bltnode *blit );
  99. VOID InitArea( struct AreaInfo *areaInfo, APTR vectorBuffer, LONG maxVectors );
  100. VOID SetRGB4( struct ViewPort *vp, LONG index, ULONG red, ULONG green, ULONG blue );
  101. VOID QBSBlit( struct bltnode *blit );
  102. VOID BltClear( PLANEPTR memBlock, ULONG byteCount, ULONG flags );
  103. VOID RectFill( struct RastPort *rp, LONG xMin, LONG yMin, LONG xMax, LONG yMax );
  104. VOID BltPattern( struct RastPort *rp, CONST PLANEPTR mask, LONG xMin, LONG yMin, LONG xMax, LONG yMax, ULONG maskBPR );
  105. ULONG ReadPixel( struct RastPort *rp, LONG x, LONG y );
  106. LONG WritePixel( struct RastPort *rp, LONG x, LONG y );
  107. BOOL Flood( struct RastPort *rp, ULONG mode, LONG x, LONG y );
  108. VOID PolyDraw( struct RastPort *rp, LONG count, CONST WORD *polyTable );
  109. VOID SetAPen( struct RastPort *rp, ULONG pen );
  110. VOID SetBPen( struct RastPort *rp, ULONG pen );
  111. VOID SetDrMd( struct RastPort *rp, ULONG drawMode );
  112. VOID InitView( struct View *view );
  113. VOID CBump( struct UCopList *copList );
  114. VOID CMove( struct UCopList *copList, APTR destination, LONG data );
  115. VOID CWait( struct UCopList *copList, LONG v, LONG h );
  116. LONG VBeamPos( VOID );
  117. VOID InitBitMap( struct BitMap *bitMap, LONG depth, LONG width, LONG height );
  118. VOID ScrollRaster( struct RastPort *rp, LONG dx, LONG dy, LONG xMin, LONG yMin, LONG xMax, LONG yMax );
  119. VOID WaitBOVP( struct ViewPort *vp );
  120. WORD GetSprite( struct SimpleSprite *sprite, LONG num );
  121. VOID FreeSprite( LONG num );
  122. VOID ChangeSprite( struct ViewPort *vp, struct SimpleSprite *sprite, UWORD *newData );
  123. VOID MoveSprite( struct ViewPort *vp, struct SimpleSprite *sprite, LONG x, LONG y );
  124. VOID LockLayerRom( struct Layer *layer );
  125. VOID UnlockLayerRom( struct Layer *layer );
  126. VOID SyncSBitMap( struct Layer *layer );
  127. VOID CopySBitMap( struct Layer *layer );
  128. VOID OwnBlitter( VOID );
  129. VOID DisownBlitter( VOID );
  130. struct TmpRas *InitTmpRas( struct TmpRas *tmpRas, PLANEPTR buffer, LONG size );
  131. VOID AskFont( struct RastPort *rp, struct TextAttr *textAttr );
  132. VOID AddFont( struct TextFont *textFont );
  133. VOID RemFont( struct TextFont *textFont );
  134. PLANEPTR AllocRaster( ULONG width, ULONG height );
  135. VOID FreeRaster( PLANEPTR p, ULONG width, ULONG height );
  136. VOID AndRectRegion( struct Region *region, CONST struct Rectangle *rectangle );
  137. BOOL OrRectRegion( struct Region *region, CONST struct Rectangle *rectangle );
  138. struct Region *NewRegion( VOID );
  139. BOOL ClearRectRegion( struct Region *region, CONST struct Rectangle *rectangle );
  140. VOID ClearRegion( struct Region *region );
  141. VOID DisposeRegion( struct Region *region );
  142. VOID FreeVPortCopLists( struct ViewPort *vp );
  143. VOID FreeCopList( struct CopList *copList );
  144. VOID ClipBlit( struct RastPort *srcRP, LONG xSrc, LONG ySrc, struct RastPort *destRP, LONG xDest, LONG yDest, LONG xSize, LONG ySize, ULONG minterm );
  145. BOOL XorRectRegion( struct Region *region, CONST struct Rectangle *rectangle );
  146. VOID FreeCprList( struct cprlist *cprList );
  147. struct ColorMap *GetColorMap( LONG entries );
  148. VOID FreeColorMap( struct ColorMap *colorMap );
  149. ULONG GetRGB4( struct ColorMap *colorMap, LONG entry );
  150. VOID ScrollVPort( struct ViewPort *vp );
  151. struct CopList *UCopperListInit( struct UCopList *uCopList, LONG n );
  152. VOID FreeGBuffers( struct AnimOb *anOb, struct RastPort *rp, LONG flag );
  153. VOID BltBitMapRastPort( CONST struct BitMap *srcBitMap, LONG xSrc, LONG ySrc, struct RastPort *destRP, LONG xDest, LONG yDest, LONG xSize, LONG ySize, ULONG minterm );
  154. BOOL OrRegionRegion( CONST struct Region *srcRegion, struct Region *destRegion );
  155. BOOL XorRegionRegion( CONST struct Region *srcRegion, struct Region *destRegion );
  156. BOOL AndRegionRegion( CONST struct Region *srcRegion, struct Region *destRegion );
  157. VOID SetRGB4CM( struct ColorMap *colorMap, LONG index, ULONG red, ULONG green, ULONG blue );
  158. VOID BltMaskBitMapRastPort( CONST struct BitMap *srcBitMap, LONG xSrc, LONG ySrc, struct RastPort *destRP, LONG xDest, LONG yDest, LONG xSize, LONG ySize, ULONG minterm, CONST PLANEPTR bltMask );
  159. BOOL AttemptLockLayerRom( struct Layer *layer );
  160. /*--- functions in V36 or higher (Release 2.0) ---*/
  161. APTR GfxNew( ULONG gfxNodeType );
  162. VOID GfxFree( APTR gfxNodePtr );
  163. VOID GfxAssociate( CONST APTR associateNode, APTR gfxNodePtr );
  164. VOID BitMapScale( struct BitScaleArgs *bitScaleArgs );
  165. UWORD ScalerDiv( ULONG factor, ULONG numerator, ULONG denominator );
  166. WORD TextExtent( struct RastPort *rp, CONST_STRPTR string, LONG count, struct TextExtent *textExtent );
  167. ULONG TextFit( struct RastPort *rp, CONST_STRPTR string, ULONG strLen, CONST struct TextExtent *textExtent, CONST struct TextExtent *constrainingExtent, LONG strDirection, ULONG constrainingBitWidth, ULONG constrainingBitHeight );
  168. APTR GfxLookUp( CONST APTR associateNode );
  169. BOOL VideoControl( struct ColorMap *colorMap, struct TagItem *tagarray );
  170. BOOL VideoControlTags( struct ColorMap *colorMap, ULONG tag1Type, ... );
  171. struct MonitorSpec *OpenMonitor( CONST_STRPTR monitorName, ULONG displayID );
  172. BOOL CloseMonitor( struct MonitorSpec *monitorSpec );
  173. DisplayInfoHandle FindDisplayInfo( ULONG displayID );
  174. ULONG NextDisplayInfo( ULONG displayID );
  175. ULONG GetDisplayInfoData( CONST DisplayInfoHandle handle, APTR buf, ULONG size, ULONG tagID, ULONG displayID );
  176. VOID FontExtent( CONST struct TextFont *font, struct TextExtent *fontExtent );
  177. LONG ReadPixelLine8( struct RastPort *rp, ULONG xstart, ULONG ystart, ULONG width, UBYTE *array, struct RastPort *tempRP );
  178. LONG WritePixelLine8( struct RastPort *rp, ULONG xstart, ULONG ystart, ULONG width, UBYTE *array, struct RastPort *tempRP );
  179. LONG ReadPixelArray8( struct RastPort *rp, ULONG xstart, ULONG ystart, ULONG xstop, ULONG ystop, UBYTE *array, struct RastPort *temprp );
  180. LONG WritePixelArray8( struct RastPort *rp, ULONG xstart, ULONG ystart, ULONG xstop, ULONG ystop, UBYTE *array, struct RastPort *temprp );
  181. LONG GetVPModeID( CONST struct ViewPort *vp );
  182. LONG ModeNotAvailable( ULONG modeID );
  183. VOID EraseRect( struct RastPort *rp, LONG xMin, LONG yMin, LONG xMax, LONG yMax );
  184. ULONG ExtendFont( struct TextFont *font, CONST struct TagItem *fontTags );
  185. ULONG ExtendFontTags( struct TextFont *font, ULONG tag1Type, ... );
  186. VOID StripFont( struct TextFont *font );
  187. /*--- functions in V39 or higher (Release 3) ---*/
  188. UWORD CalcIVG( struct View *v, struct ViewPort *vp );
  189. LONG AttachPalExtra( struct ColorMap *cm, struct ViewPort *vp );
  190. LONG ObtainBestPenA( struct ColorMap *cm, ULONG r, ULONG g, ULONG b, CONST struct TagItem *tags );
  191. LONG ObtainBestPen( struct ColorMap *cm, ULONG r, ULONG g, ULONG b, ULONG tag1Type, ... );
  192. VOID SetRGB32( struct ViewPort *vp, ULONG n, ULONG r, ULONG g, ULONG b );
  193. ULONG GetAPen( struct RastPort *rp );
  194. ULONG GetBPen( struct RastPort *rp );
  195. ULONG GetDrMd( struct RastPort *rp );
  196. ULONG GetOutlinePen( struct RastPort *rp );
  197. VOID LoadRGB32( struct ViewPort *vp, CONST ULONG *table );
  198. ULONG SetChipRev( ULONG want );
  199. VOID SetABPenDrMd( struct RastPort *rp, ULONG apen, ULONG bpen, ULONG drawmode );
  200. VOID GetRGB32( CONST struct ColorMap *cm, ULONG firstcolor, ULONG ncolors, ULONG *table );
  201. struct BitMap *AllocBitMap( ULONG sizex, ULONG sizey, ULONG depth, ULONG flags, CONST struct BitMap *friend_bitmap );
  202. VOID FreeBitMap( struct BitMap *bm );
  203. LONG GetExtSpriteA( struct ExtSprite *ss, CONST struct TagItem *tags );
  204. LONG GetExtSprite( struct ExtSprite *ss, ULONG tag1Type, ... );
  205. ULONG CoerceMode( struct ViewPort *vp, ULONG monitorid, ULONG flags );
  206. VOID ChangeVPBitMap( struct ViewPort *vp, struct BitMap *bm, struct DBufInfo *db );
  207. VOID ReleasePen( struct ColorMap *cm, ULONG n );
  208. ULONG ObtainPen( struct ColorMap *cm, ULONG n, ULONG r, ULONG g, ULONG b, LONG f );
  209. ULONG GetBitMapAttr( CONST struct BitMap *bm, ULONG attrnum );
  210. struct DBufInfo *AllocDBufInfo( struct ViewPort *vp );
  211. VOID FreeDBufInfo( struct DBufInfo *dbi );
  212. ULONG SetOutlinePen( struct RastPort *rp, ULONG pen );
  213. ULONG SetWriteMask( struct RastPort *rp, ULONG msk );
  214. VOID SetMaxPen( struct RastPort *rp, ULONG maxpen );
  215. VOID SetRGB32CM( struct ColorMap *cm, ULONG n, ULONG r, ULONG g, ULONG b );
  216. VOID ScrollRasterBF( struct RastPort *rp, LONG dx, LONG dy, LONG xMin, LONG yMin, LONG xMax, LONG yMax );
  217. LONG FindColor( struct ColorMap *cm, ULONG r, ULONG g, ULONG b, LONG maxcolor );
  218. struct ExtSprite *AllocSpriteDataA( CONST struct BitMap *bm, CONST struct TagItem *tags );
  219. struct ExtSprite *AllocSpriteData( CONST struct BitMap *bm, ULONG tag1Type, ... );
  220. LONG ChangeExtSpriteA( struct ViewPort *vp, struct ExtSprite *oldsprite, struct ExtSprite *newsprite, CONST struct TagItem *tags );
  221. LONG ChangeExtSprite( struct ViewPort *vp, struct ExtSprite *oldsprite, struct ExtSprite *newsprite, ULONG tag1Type, ... );
  222. VOID FreeSpriteData( struct ExtSprite *sp );
  223. VOID SetRPAttrsA( struct RastPort *rp, CONST struct TagItem *tags );
  224. VOID SetRPAttrs( struct RastPort *rp, ULONG tag1Type, ... );
  225. VOID GetRPAttrsA( CONST struct RastPort *rp, CONST struct TagItem *tags );
  226. VOID GetRPAttrs( CONST struct RastPort *rp, ULONG tag1Type, ... );
  227. ULONG BestModeIDA( CONST struct TagItem *tags );
  228. ULONG BestModeID( ULONG tag1Type, ... );
  229. /*--- functions in V40 or higher (Release 3.1) ---*/
  230. VOID WriteChunkyPixels( struct RastPort *rp, ULONG xstart, ULONG ystart, ULONG xstop, ULONG ystop, CONST UBYTE *array, LONG bytesperrow );
  231.  
  232. #ifdef __cplusplus
  233. }
  234. #endif /* __cplusplus */
  235.  
  236. #endif   /* CLIB_GRAPHICS_PROTOS_H */
  237.